#ifndef SLICEMAINWINDOW_H
#define SLICEMAINWINDOW_H

#include <QLabel>
#include <QStatusBar>
#include <QMainWindow>

#include <memory>

#include "stlslicewidget.h"
#include "contourmainwindow.h"

namespace Ui {
class SliceMainWindow;
}

class SliceMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit SliceMainWindow(QWidget *parent = nullptr);
    ~SliceMainWindow();

public:
    void iniUI();
    void initSliceWidget(std::shared_ptr<STLReader> sp_stl_reader, const SliceInfo& slice_info);
    void updateCurrentFileLabel(const qsizetype& cur_slice_indice, const qsizetype& total_slice_amount);
    void createContoursWindow(ContourInfo contour_info);

private slots:
    void on_actionContourExtraction_triggered();

private:
    std::shared_ptr<STLReader> m_sp_stl_reader;
    std::shared_ptr<STLSliceWidget> m_sp_sliceWidget;
    std::shared_ptr<ContourMainWindow> m_sp_contourWidget;

private:
    Ui::SliceMainWindow *ui;
    QLabel *fLabCurFile;
};

#endif // SLICEMAINWINDOW_H
